package com.example.springbootprometheus.beans;
import org.springframework.stereotype.Component;
import javax.annotation.PreDestroy;

/**
 * Created by IntelliJ IDEA2022.3.2
 * @Author: Tenghw
 * @Date: 2023/04/28  13:15
 * @Description: 测试ShutdownHook关闭钩子函数。
 */
@Component
public class UserService {
    @PreDestroy
    public void destory(){
        System.out.println("bean destory...");
    }
}
